//
//  OpActivities.m
//  LoveBeeProject
//
//  Created by skywalker on 17/1/9.
//  Copyright © 2017年 斯芬克斯. All rights reserved.
//

#import "OpActivities.h"

@implementation OpActivities
- (void)loadDataWithActivtiesMethod:(network)method url:(NSString *)urlstr parameters:(id)parameters success:(void(^)(id responseobject))successBlock failure:(void(^)(NSError *error))failureBlock{
    [[Networking sharedNetworking] loadDataWithMethod:method url:urlstr parameters:parameters success:^(id responseobject) {
        
        NSDictionary *result = responseobject;
        NSArray *dictArr = result[@"data"];
        //字典转模型
        NSArray *arrM = [NSArray yy_modelArrayWithClass:[OpActivities class] json:dictArr];
        NSLog(@"%@----%@",result,arrM);
        if (successBlock) {
            successBlock(arrM);
        }
    } failure:^(NSError *error) {
        
        if (failureBlock) {
            
            failureBlock(error);
        }
        
    }];
    
    
}

                                                                                            

@end
